﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HHG.Common
{
   public static class MyConvert
    {
       

       public static void ConvertToSWF(string oldFile, string swfFile)
       {
           System.Diagnostics.Process pc = new System.Diagnostics.Process();
           pc.StartInfo.FileName = @"C:\FlashPaper2.2\FlashPrinter.exe";
           //pc.StartInfo.FileName = @"C:\Program Files\Macromedia\FlashPaper 2\FlashPrinter.exe";
           pc.StartInfo.Arguments = string.Format("{0} -o {1}", oldFile, swfFile);
           pc.StartInfo.CreateNoWindow = true;
           pc.StartInfo.UseShellExecute = false;
           pc.StartInfo.RedirectStandardInput = false;
           pc.StartInfo.RedirectStandardOutput = false;
           pc.StartInfo.RedirectStandardError = true;
           pc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
           bool falg = pc.Start();
           pc.WaitForExit();
           pc.Close();
           pc.Dispose();
           //if (falg)
           //    this.BindFiles();
       }
    }
}
